//
//  SHD_SearUserTableCell.m
//  B段项目
//
//  Created by dllo on 15/11/11.
//  Copyright © 2015年 谢美娜. All rights reserved.
//

#import "SHD_SearUserTableCell.h"

@implementation SHD_SearUserTableCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _leftImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:_leftImageView];
        _titleLabel = [[myTitleLabel alloc]init];
        [self.contentView addSubview:_titleLabel];
        _rightImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:_rightImageView];
    }
    return self;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    _leftImageView.frame = CGRectMake(15 * FitWidth, 15 * FitHeight, 40 * FitWidth, 40 * FitHeight);
    _leftImageView.layer.cornerRadius = 20 * FitHeight;
    _titleLabel.frame = CGRectMake(_leftImageView.frame.origin.x + _leftImageView.frame.size.width + 15 * FitWidth, _leftImageView.frame.origin.y + 10 * FitHeight, 100 * FitWidth, 20 * FitHeight);
    _rightImageView.frame = CGRectMake(344 * FitWidth, 27 * FitHeight, 16 * FitWidth, 16 * FitHeight);
}
-(void)setList:(SHD_UserList *)list
{
    _list = list;
    [_leftImageView sd_setImageWithURL:[NSURL URLWithString:list.icon] placeholderImage:[UIImage imageNamed:@"占位"]];
    _titleLabel.text = list.uname;
    _leftImageView.clipsToBounds = YES;
    _rightImageView.image = [UIImage imageNamed:@"SHD_右箭头"];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
